home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / AfterDark / BlackLikeMe ƒ / BlackLikeMe.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-14  |  2.2 KB  |  81 lines  |  [TEXT/KAHL]

  1.  
  2.  
  3. #include "GraphicsModule_Types.h"
  4. #include "Sounds.h"
  5.  
  6.  
  7. // these are the functs that need defined ...
  8. OSErr DoInitialize(Handle *storage, RgnHandle blankRgn, GMParamBlockPtr params);
  9. OSErr DoClose(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params);
  10. OSErr DoBlank(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params);
  11. OSErr DoDrawFrame(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params);
  12. OSErr DoSetUp(RgnHandle blankRgn, short message, GMParamBlockPtr params);
  13.  
  14. // extra ones
  15. OSErr DoSelected(RgnHandle blankRgn, short message, GMParamBlockPtr params);
  16. OSErr DoAboutBox(RgnHandle blankRgn, short message, GMParamBlockPtr params);
  17.  
  18.  
  19.  
  20. //////////////////////////////////////////////////////////////////////////////////////
  21. // this is the first funct called by AD ... we need to allocate and initialize here
  22. OSErr
  23. DoInitialize(Handle *storage, RgnHandle blankRgn, GMParamBlockPtr params) {
  24.  
  25.     return noErr;
  26. }
  27.  
  28. //////////////////////////////////////////////////////////////////////////////////////
  29. // the screen saver has been awakened! time to ditch the storage and wave goodbye
  30. OSErr 
  31. DoClose(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params) {
  32.  
  33.  
  34.     return noErr;
  35. }
  36.  
  37.  
  38.  
  39. //////////////////////////////////////////////////////////////////////////////////////
  40. // make the screen go black
  41. OSErr
  42. DoBlank(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params) {
  43.  
  44.     // darken the screen ...
  45.     FillRgn(blankRgn, params->qdGlobalsCopy->qdBlack);
  46.     return noErr;
  47.  
  48. }
  49.  
  50. //////////////////////////////////////////////////////////////////////////////////////
  51. // this is the workhorse routine. It does the continual screen work to make
  52. // this screen saver what it is.
  53. OSErr 
  54. DoDrawFrame(Handle storage, RgnHandle blankRgn, GMParamBlockPtr params) 
  55. {
  56.     return noErr;
  57. }
  58.  
  59. //////////////////////////////////////////////////////////////////////////////////////
  60. // this is called when they click on something in the control panel
  61. OSErr 
  62. DoSetUp(RgnHandle blankRgn, short message, GMParamBlockPtr params) {
  63.  
  64.     return noErr;
  65. }
  66.  
  67.  
  68.  
  69. OSErr DoSelected(RgnHandle blankRgn, short message, GMParamBlockPtr params) {
  70.     return noErr;
  71. }
  72.  
  73.  
  74.  
  75. OSErr DoAboutBox(RgnHandle blankRgn, short message, GMParamBlockPtr params) {
  76.  
  77.     return noErr;
  78. }
  79.  
  80.  
  81.